/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package abstractmodel;

/**
 * notice: any class implements this interface should have a 
 * public constructor which takes no parameters
 * @author littlechild
 */
public interface IModelFactory {
    /**
     * this function is used when a user tries to login
     * 
     * @param name
     * @param password
     * @return
     *      if name is set null, this indicates no such user.
     */
    public IUser getUser(String name,String password);
    public String[] getAllUserName();
    /**
     * the newXXX function should only be used when you want to create a new thing
     * @return
     */
    public IUser newUser(String name, String password);
    public boolean deleteUser(IUser user);
    public IBook newBook();
    public IAccount newAccount(AccountType accountType );
    public IDetail newDetail(IAccount account);
}
